<?php

namespace addons\official\model;

class OfficialListJournalism extends OfficialBaseModel
{
    /**
     * 增加日参数
     */
    public function getCreatetimeDAttr($value, $data)
    {
        return date('d', $data['createtime']);
    }

    /**
     * 增加年月参数
     */
    public function getCreatetimeYMAttr($value, $data)
    {
        return date('Y-m', $data['createtime']);
    }
}